package com.jrx.anytxn.investor.service;

import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.investor.bean.InvestorPaymentSaveBean;
import com.jrx.anytxn.investor.entity.AmLoanAccountInvestorInfo;
import com.jrx.anytxn.investor.entity.AmLoanMainInvestorInfo;
import com.jrx.anytxn.investor.entity.AmRepaymentPlanInvestorInfo;
import com.jrx.anytxn.transaction.bean.DelqParamBean;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @program: anytxn-cf-transaction
 * @description:
 * @author: xiaoyu.jing
 * @date: 2020-05-26 11:01
 **/
public interface IInvestorHandlePaymentService {

    /**
     * 还款分配准备
     * @param saveBean
     * @param loanMain
     * @param loanAcct
     * @param planList
     * @param repayMap
     * @param delqParamBean
     * @param bussinessDate
     * @throws TxnException
     */
    void dealPrepare(InvestorPaymentSaveBean saveBean, AmLoanMainInvestorInfo loanMain, AmLoanAccountInvestorInfo loanAcct, List<AmRepaymentPlanInvestorInfo> planList,
                     Map<String, BigDecimal> repayMap, DelqParamBean delqParamBean, Date bussinessDate) throws TxnException;

    /**
     * 还款分配前处理
     * @param saveBean
     * @param loanMainInvestorInfoList
     * @param loanAccountInvestorInfoList
     * @param planList
     * @param delqParamBean
     * @param bussinessDate
     * @throws TxnException
     */
    void dealBeforeAllocation(InvestorPaymentSaveBean saveBean, List<AmLoanMainInvestorInfo> loanMainInvestorInfoList,
                              List<AmLoanAccountInvestorInfo> loanAccountInvestorInfoList, List<AmRepaymentPlanInvestorInfo> planList,
                              DelqParamBean delqParamBean, Date bussinessDate) throws TxnException;

}
